function selectReason(el, divid)
{
    document.getElementById(divid).value = el.options[el.selectedIndex].innerHTML;
    return true;
}


function showOrHideReasonRow(el, divid, rightvalue)
{
	var approved = el.options[el.selectedIndex].value;
	
	if (rightvalue == approved)
	{
    	document.getElementById(divid).style.display = "block";
	}
	else
	{
		document.getElementById(divid).style.display = "none";
	}
}


function updateComposerName()
{
    if (!document.getElementById('ringtone_composed_by_user'))
    {
        return;
    }
    
    
    var composernameText = document.getElementById("ringtone_composer_name");
    var backupValue = composernameText.value;
    
    var creatorName = document.getElementById("creatorname");
    
    var yesorno = document.getElementById('ringtone_composed_by_user').checked;
    
    if (yesorno)
    {
        //composernameText.value = 'Tự sáng tác';
        composernameText.value = creatorName.value;
        composernameText.disabled = 'disabled';
    }
    else
    {
        composernameText.value = backupValue;
        composernameText.disabled = '';
    }
}
